Skip to main content

Full text of "Arduino"

See other formats


Ardui no-Controlled Night Light 



.1 



Make Projects 



build, hack, tweak, share, discover. 



Arduino-Controlled Night Light 



Written By: Andre 



TOOLS: 



Pliers (1) 
Wire cutters (1) 
Wire stripper (1) 



PARTS: 



Arduino Uno (1) 
Solderless breadboard (1) 
LED, 3mm, any color (3) 
330 ohm resistor (3) 
Resistor 10KQ (1) 
Wired) 

LDR Light Sensor (1) 
9v battery snap (1) 
Battery, 9V(1) 



SUMMARY 

Using a light sensor, some wire, and LEDs you can easily create an automatic night light 
that will turn on when you turn off the lights. 



© Make Projects 



www.makeprojects.com 



Page 1 of 6 



Ardui no-Controlled Night Light 



Step 1 — Arduino-Controlled Night Light 




• These are the parts and tools you will need. 



Step 2 




• Connect the ground pin on the Arduino Uno to the ground rail on the breadboard. This is 
usually the first step in any project I do just so I can draw ground from any part of the rail. 



© Make Projects 



www.makeprojects.com 



Page 2 of 6 



Ardui no-Controlled Night Light 



Step 3 




• Plug in your LDR Light Sensor into pin F 51 and F 53. Then connect a 10k resistor to G 51 
and and G 46. Then a short wire from the ground rail to H 46. Then take a wire from the 5v 
pin on the Arduino to G 53. Then take a wire from digital pin 7 on the Arduino to H 51 . 





• Now take a wire from the ground rail to I 40. Put a 330 resistor into H 40 and H 34. Take a 
wire from digital pin 1 on the Arduino to H 33. Since LEDs have positive and negative you 
will need to plug the longer end of you LED into G 33 and the shorter into G 34. 



© Make Projects 



www.makeprojects.com 



Page 3 of 6 



Ardui no-Controlled Night Light 



Step 5 




• Repeat the process with another 
LED but this time use digital pin 2 
instead of digital pin 1. 



Step 6 




• And repeat it again but use digital 
pin 3. 



© Make Projects 



www.makeprojects.com 



Page 4 of 6 



Ardui no-Controlled Night Light 



Step 7 




• Now plug the red wire of the battery clip into the Vin of the Arduino and plug the black wire 
into the GND pin on the Arduino. 



Step 8 




• The Arduino code for the night light can be found in the PDF file above. Copy and paste it 
into the Arduino IDE, then upload it. 

• Now your lights should turn on when the light sensor senses no light. 

You can take this project further by adding code to slowly fade the LEDs on and off in different 
patterns, or by adding a timer to fade the night light off after a set period of time. 



© Make Projects 



www.makeprojects.com 



Page 5 of 6 



Ardui no-Controlled Night Light 

This document was last generated on 2012-11-26 11 :03:41 PM. 



© Make Projects www.makeprojects.com Page 6 of 6